﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using University.Workshop.Model;
using University.Workshop.Presenters.AppointmentFolder;

namespace University.Workshop.WinApp
{
    public partial class GetPosponedAppointments : Form , IPostponedAppointments
    {
        private User doctor;
        PresenterPostponedAppointments presenter;
        public GetPosponedAppointments(User doctor)
        {
            this.doctor = doctor;
            presenter = new PresenterPostponedAppointments(this);
            InitializeComponent();
        }

        private void GetPosponedAppointments_Load(object sender, EventArgs e)
        {
            label2.Text = doctor.FirstName + " " + doctor.LastName;
            label4.Text = DateTime.Now.ToShortDateString();
            dataGridView1.DataSource = presenter.ObtainPostponedAppointments();
        }

        public string DoctorId
        {
            get {
                return doctor.UserId;
            }
            set
            {
                throw new Exception("not implemented yet");
            }
        }

        public string DateToday
        {
            get
            {
                return doctor.UserId;
            }
            set
            {
                throw new Exception("not implemented yet");
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void button1_Click(object sender, EventArgs e)
        {

        }
    }
}
